package xlj.lib.android.base.push;

import android.content.Context;

import com.igexin.sdk.PushManager;

public class XLPushManager {
    protected PushHandler pushHandler;

    private static XLPushManager pushManager;

    private Class mainCls;

    private XLPushManager() {

    }

    public static XLPushManager getPushManager() {
        if (pushManager == null) {
            pushManager = new XLPushManager();
        }
        return pushManager;
    }

    public void setPushHandler(PushHandler pushHandler) {
        this.pushHandler = pushHandler;
    }

    public void init(Context context) {

        PushManager.getInstance().registerPushIntentService(context,IntentService.class);
    }

    public void registerClass(Class cls) {
        this.mainCls = cls;
    }

    public Class getMainCls() {
        return mainCls;
    }
}
